package org.shop.common.until;

import java.util.ArrayList;
import java.util.List;


public class CovertData {
	
	private List<?> data;
	
	private static CovertData obj;
	
	private CovertData(List<?> data)
	{
		this.setData(data);
	}
	
	public static CovertData getIntance(List<?> data) {
		
		if (obj == null) {    
            synchronized (CovertData.class) {    
               if (obj == null) {    
            	   obj = new CovertData(data);   
               } else {
               	  obj.setData(data);
               }   
            }    
        } else {
        	obj.setData(data);
        }
        return obj; 
	}

	public List<?> getData() {
		return data;
	}

	public void setData(List<?> data) {
		this.data = data;
	}
	
	/**
	 * 
	 * @return
	 */
	public List<Object> dataByCovert()
	{
		List<Object> adData = new ArrayList<Object>();
		
	    for(Object e : this.data){  
	        Object obj = (Object)e;  
	        adData.add(obj);  
	    }
	    
	    return adData;
	}
	
}
